<template>
  <div class="miambao">{{breadcrumb}}</div>
</template>

<script>
export default {
  
    computed: {
      breadcrumb() {
        // 嵌套路由信息都在 this.$route.matched
        // 遍历获取每一个匹配到的组件得 meta 即可生成面包屑
        // console.log( this.$route.matched);
        
        let res = "";
        this.$route.matched.forEach(element => {
          res += element.meta + "->";
        });
      

        return res;
      }
    }
  
};
</script>

<style lang="less" scoped>
 .miambao{
     padding:  10px 0;
 }
</style>